package com.teichmann.core.targets.online.revolution;

import java.io.IOException;
import java.util.Arrays;
import java.util.List;

public class OnlineExecutor {

	private String parameter;

	public OnlineExecutor(String parameter) {
		this.parameter = parameter;
	}

	public List<BasicPage> execute() {
		BasicPage[] pages = new BasicPage[] {
				new com.teichmann.core.targets.online.revolution.SulRevendas(),
				new com.teichmann.core.targets.online.revolution.AutoCarro() };
		try {
			CarSearch search = new CarSearch(pages);
			search.process(parameter);
			return Arrays.asList(pages);

		} catch (IOException e) {
			e.printStackTrace();
			return null;
		}
	}

}
